<template>
  <div class="hello">
    <h1>{{ msg }}</h1>
    <h2>Essential Links</h2>
    <x-switch :title="title" :value-map="['0', '1']" v-model="stringValue"></x-switch>
    <loading :show="show1" :text="text1"></loading>
  </div>
</template>

<script>
  import {Loading, Alert, XSwitch} from 'vux'

  export default {
    name: 'HelloWorld',
    data() {
      return {
        msg: 'Welcome to Your Vue.js App',
        text1: 'Welcome',
        show1: true,
        title: '预警状态',
        stringValue: true
      }
    },
    components: {
      Loading,
      Alert,
      XSwitch
    }
  }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style>
  h1, h2 {
    font-weight: normal;
  }

  ul {
    list-style-type: none;
    padding: 0;
  }

  li {
    display: inline-block;
    margin: 0 10px;
  }

  a {
    color: #42b983;
  }
</style>
